package a.f.l.a;

import a.c.d;
import a.c.k;
import a.c.z;
import a.d.n;
import a.d.t;
import a.d.v;
import a.d.w;
import a.f.o;
import a.f.tb;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

class ab
  extends u
{
  private static final double d = 1.0E-006D;
  private HashMap e;
  private List f;
  
  public void a()
  {
    super.a();
    this.e = null;
    this.f = null;
  }
  
  public void a(mb parammb, List paramList)
  {
    boolean bool = sb.e;
    int m = sb.d;
    List localList = (List)this.e.get(parammb);
    if ((bool) || (localList != null))
    {
      Iterator localIterator = localList.iterator();
      label172:
      label183:
      label206:
      label236:
      do
      {
        do
        {
          b_ localb_1;
          d locald;
          mb localmb;
          int i;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localb_1 = (b_)localIterator.next();
            locald = localb_1.a;
            localmb = null;
            i = 0;
            int j = 0;
            do
            {
              if (j >= localb_1.c.length) {
                break;
              }
              n localn = localb_1.c[j];
              if (m != 0) {
                break label236;
              }
              if (localmb != null)
              {
                if (bool) {
                  break label172;
                }
                if (!localmb.h().a(localn.e()))
                {
                  int k = j - i + 1;
                  b_ localb_2 = a(locald, localb_1, i, k);
                  a(localmb, localb_2);
                  if (bool) {
                    break label206;
                  }
                  if (m == 0) {
                    break label183;
                  }
                }
              }
              if (!bool)
              {
                if (localmb == null)
                {
                  localmb = a(paramList, localn, localmb, localb_1.b + j, locald);
                  i = j;
                  if (bool) {
                    continue;
                  }
                }
              }
              else {
                if (localmb == null) {
                  break;
                }
              }
              j++;
            } while (m == 0);
          } while ((bool) || (localmb == null));
          a(localmb, a(locald, localb_1, i, localb_1.c.length - i));
          if ((bool) || ((!bool) && (m != 0))) {
            return;
          }
        } while (bool);
      } while (m == 0);
      this.e.remove(parammb);
    }
  }
  
  private b_ a(d paramd, b_ paramb_, int paramInt1, int paramInt2)
  {
    n[] arrayOfn = new n[paramInt2];
    System.arraycopy(paramb_.c, paramInt1, arrayOfn, 0, paramInt2);
    return new b_(paramd, arrayOfn, paramb_.b + paramInt1, null);
  }
  
  private mb a(List paramList, n paramn, mb parammb, int paramInt, d paramd)
  {
    boolean bool = sb.e;
    int i = sb.d;
    Object localObject = null;
    List localList = a(paramList, paramn);
    Iterator localIterator = localList.iterator();
    label88:
    do
    {
      do
      {
        mb localmb;
        do
        {
          do
          {
            if (!localIterator.hasNext()) {
              break label128;
            }
            localmb = (mb)localIterator.next();
            if (bool) {
              break label88;
            }
            if (!localmb.h().a(paramn.e())) {
              break;
            }
            if (bool) {
              break label88;
            }
            localObject = localmb;
          } while (i == 0);
        } while (localmb == parammb);
        a(localmb, new b_(paramd, new n[] { paramn }, paramInt, null));
      } while (bool);
    } while (i == 0);
    label128:
    return localObject;
  }
  
  private void a(mb parammb, b_ paramb_)
  {
    Object localObject = (List)this.e.get(parammb);
    if (!sb.e) {
      if (localObject == null)
      {
        localObject = new ArrayList();
        this.e.put(parammb, localObject);
      }
    }
    ((List)localObject).add(paramb_);
  }
  
  private List a(List paramList, n paramn)
  {
    boolean bool = sb.e;
    int i = sb.d;
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = paramList.iterator();
    do
    {
      do
      {
        mb localmb;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localmb = (mb)localIterator.next();
        } while (!paramn.a(localmb.h()));
        if ((bool) || (i != 0)) {
          break label88;
        }
        localArrayList.add(localmb);
      } while (bool);
    } while (i == 0);
    label88:
    return localArrayList;
  }
  
  public void b(mb parammb)
  {
    boolean bool = sb.e;
    int i = sb.d;
    List localList = (List)this.e.get(parammb);
    if (((bool) || (localList != null)) && (localList.size() > 0))
    {
      fb localfb = parammb.b();
      Iterator localIterator = localList.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        b_ localb_ = (b_)localIterator.next();
        t localt = parammb.h();
        w localw1 = localb_.c[0].d();
        w localw2 = localb_.c[(localb_.c.length - 1)].e();
        c_ localc_1 = a(localt, localw1, true);
        c_ localc_2 = a(localt, localw2, false);
        m localm = new m(localb_.a, parammb, localc_1.a, localc_2.a, localc_1.b, localc_2.b, localb_.b);
        localfb.a(localm);
      } while (i == 0);
    }
  }
  
  private c_ a(t paramt, w paramw, boolean paramBoolean)
  {
    boolean bool = sb.e;
    double d1 = paramt.d();
    double d2 = d1 + paramt.b();
    double d3 = paramt.e();
    double d4 = d3 + paramt.c();
    double d5 = paramw.a();
    double d6 = paramw.b();
    if (!bool) {
      if (d5 < d1 + 1.0E-006D) {
        return new c_(paramBoolean ? tb.b : tb.d, new jb(d6, d6, d1, true), null);
      }
    }
    if (!bool) {
      if (d5 > d2 - 1.0E-006D) {
        return new c_(paramBoolean ? tb.d : tb.b, new jb(d6, d6, d2, true), null);
      }
    }
    if (!bool) {
      if (d6 < d3 + 1.0E-006D) {
        return new c_(paramBoolean ? tb.c : tb.a, new jb(d5, d5, d3, false), null);
      }
    }
    if (d6 > d4 - 1.0E-006D) {
      return new c_(paramBoolean ? tb.a : tb.c, new jb(d5, d5, d4, false), null);
    }
    return new c_(null, null, null);
  }
  
  public void a(mb parammb)
  {
    if ((sb.e) || (this.f != null))
    {
      this.e.put(parammb, this.f);
      this.f = null;
    }
  }
  
  public void a(qb paramqb, s params)
  {
    boolean bool = sb.e;
    int j = sb.d;
    super.a(paramqb, params);
    o localo = paramqb.a();
    this.e = new HashMap();
    a locala = paramqb.c();
    k localk = localo.c(locala.j());
    if ((locala.h() == 0) || (localk == null)) {
      return;
    }
    this.f = new z();
    a.c.m localm = localo.w();
    label264:
    do
    {
      do
      {
        if (!localm.e()) {
          return;
        }
        d locald = localm.a();
        if (bool) {
          break;
        }
        if (!localk.getBool(locald))
        {
          v localv = localo.n(locald).l();
          if (!bool) {
            if (a.b(locald, localo))
            {
              n[] arrayOfn = a.c(locald, localo);
              this.f.add(new b_(locald, arrayOfn, 0, null));
              if (bool) {
                break;
              }
              if (j == 0) {
                break label264;
              }
            }
          }
          int i = 0;
          do
          {
            if (!localv.e()) {
              break label264;
            }
            n localn = localv.a();
            if (j != 0) {
              break;
            }
            if (a(localn)) {
              this.f.add(new b_(locald, new n[] { localn }, i, null));
            }
            localv.f();
            i++;
          } while (j == 0);
        }
        localm.f();
      } while (bool);
    } while (j == 0);
  }
  
  private boolean a(n paramn)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (!paramn.c()) {
        if (bool) {
          break label27;
        }
      }
    }
    label27:
    return paramn.b();
  }
  
  private static class c_
  {
    final jb a;
    final tb b;
    
    private c_(tb paramtb, jb paramjb)
    {
      this.b = paramtb;
      this.a = paramjb;
    }
    
    c_(tb paramtb, jb paramjb, ab.0 param0)
    {
      this(paramtb, paramjb);
    }
  }
  
  private static class b_
  {
    private final d a;
    private final int b;
    private final n[] c;
    
    private b_(d paramd, n[] paramArrayOfn, int paramInt)
    {
      this.a = paramd;
      this.c = paramArrayOfn;
      this.b = paramInt;
    }
    
    b_(d paramd, n[] paramArrayOfn, int paramInt, ab.0 param0)
    {
      this(paramd, paramArrayOfn, paramInt);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.ab

 * JD-Core Version:    0.7.0.1

 */